package me.heyclock.hl.recordwriter.robot;

import android.content.Context;
import android.os.Bundle;

import com.iflytek.cloud.SpeechError;
import com.iflytek.cloud.SynthesizerListener;

/**
 * @des 语音合成监听
 * @author  hl
 * @date 2018.06.08
 */
public class MySynthesizerListener implements SynthesizerListener {
    private Context context;
    private ProcessBack processBack;
    public MySynthesizerListener(Context context, ProcessBack processBack){
        this.context = context;
        this.processBack = processBack;
    }
    @Override
    public void onSpeakBegin() {

    }

    @Override
    public void onBufferProgress(int i, int i1, int i2, String s) {

    }

    @Override
    public void onSpeakPaused() {

    }

    @Override
    public void onSpeakResumed() {

    }

    @Override
    public void onSpeakProgress(int i, int i1, int i2) {

    }

    @Override
    public void onCompleted(SpeechError speechError) {
        processBack.onComplete();
    }

    @Override
    public void onEvent(int i, int i1, int i2, Bundle bundle) {

    }
    public interface ProcessBack{
        void onComplete();
    }
}
